create or replace view vac_app_lists_entries_4_1 as
with lte as
(
select
 workspace,
 workspace_display_name,
 application_id,
 application_name,
 list_name,
 parent_entry_text,
 to_char(display_sequence) display_sequence,
 entry_text,
 entry_target,
 entry_image,
 entry_image_attributes,
 entry_image_alt_attribute,
 current_for_pages_type,
 current_for_pages_type_code,
 current_for_pages_expression,
 condition_type,
 condition_type_code,
 condition_expression1,
 condition_expression2,
 count_clicks,
 click_count_category,
 entry_attribute_01,
 entry_attribute_02,
 entry_attribute_03,
 entry_attribute_04,
 entry_attribute_05,
 entry_attribute_06,
 entry_attribute_07,
 entry_attribute_08,
 entry_attribute_09,
 entry_attribute_10,
 translate_attributes,
 build_option,
 authorization_scheme,
 authorization_scheme_id,
 primary_application_id,
 translated_app_language,
 last_updated_by,
 last_updated_on,
 component_comment,
 list_id,
 list_entry_parent_id,
 list_entry_id
from APEX_APPLICATION_LIST_ENTRIES t
)
select
 workspace,
 workspace_display_name,
 application_id,
 application_name,
 list_name,
 entry_text,
 list_id,
 list_entry_parent_id,
 list_entry_id
 last_updated_by,
 last_updated_on,
 authorization_scheme_id,
 primary_application_id,
 u_name,
 u_value,
 'APEX_APPLICATION_LIST_ENTRIES' src_view_name
from lte
  UNPIVOT INCLUDE NULLS (
   u_value
   FOR    u_name
   IN
   (
     parent_entry_text,
     display_sequence,
     entry_target,
     entry_image,
     entry_image_attributes,
     entry_image_alt_attribute,
     current_for_pages_type,
     current_for_pages_type_code,
     current_for_pages_expression,
     condition_type,
     condition_type_code,
     condition_expression1,
     condition_expression2,
     count_clicks,
     click_count_category,
     entry_attribute_01,
     entry_attribute_02,
     entry_attribute_03,
     entry_attribute_04,
     entry_attribute_05,
     entry_attribute_06,
     entry_attribute_07,
     entry_attribute_08,
     entry_attribute_09,
     entry_attribute_10,
     translate_attributes,
     build_option,
     authorization_scheme,
     translated_app_language,
     component_comment
   )
);

